package utils;

import java.util.regex.Pattern;

/**
 * @Author: DRevelation
 * @Date: 2021/2/9 14:46
 */
public class PatternUtils {
    public static boolean isMobile(String mobile) {
        String regex = "(\\+\\d+)?1[3456789]\\d{9}$";
        return Pattern.matches(regex,mobile);
    }

    public static void main(String[] args) {
        boolean isMobile = PatternUtils.isMobile("18214892608");
        System.out.println("isMobile = " + isMobile);
    }
}
